<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>React基础</title>
</head>
<body>

<!--准备好的容器-->
<div id="test">

</div>
</body>
<!--核心库引入顺序，必须先是核心库然后在引入dom库-->
<script src="https://unpkg.com/react@17/umd/react.development.js" crossorigin></script>
<!--用于支持react操作dom-->
<script src="https://unpkg.com/react-dom@17/umd/react-dom.development.js" crossorigin></script>
<script type="text/javascript">
    /*1.创建虚拟DOM*/
    const dom = React.createElement('h1',{id:'title'},'Hello React!')
    /*2.渲染虚拟dom到页面*/
    ReactDOM.render(dom, document.getElementById('test'))
</script>
</html>